/**
 * 路由
 * name规则: 必须是唯一的
 * meta规则:
 *   title - string -- 导航标题， 默认不设置
 *   isNav - boolean -- 是否显示导航，默认不设置，如果为true则展示为导航
 *   icon - string -- 图标，默认不设置
 *   isWhite - boolean -- 是否白名单，默认不设置，如果为true则跳过守卫，否则进行拦截 暂无
 */

// import screen from "./module/screen";

export default [
  {
    path: "/",
    redirect: () => {
      return { path: "/login" };
    },
  },
  {
    path: "/login",
    name: "login",
    meta: {
      title: "登录",
      isNav: false,
    },
    component: () => import("@/views/login.vue"),
  },
  {
    path: "/screen",
    name: "screen",
    meta: {
      title: "大屏管理",
      isNav: true,
      icon: 'el-icon-eleme'
    },
    redirect: "/screen/list",
    component: () => import("@/views/index.vue"),
    children: [
      {
        path: "/screen/list",
        name: "screen_list",
        meta: {
          title: "大屏列表",
          isNav: true,
          icon: 'el-icon-eleme'
        },
        component: () => import("@/views/screen/list.vue"),
      },
      {
        path: "/screen/info",
        name: "screen_info",
        meta: {
          title: "大屏详情",
          isNav: false,
          icon: 'el-icon-eleme'
        },
        component: () => import("@/views/screen/info.vue"),
      },
      {
        path: "/tenant/list",
        name: "tenant_list",
        meta: {
          title: "租户列表",
          isNav: true,
          icon: 'el-icon-eleme'
        },
        component: () => import("@/views/tenant/list.vue"),
      },
      {
        path: "/tenant/info",
        name: "tenant_info",
        meta: {
          title: "租户详情",
          isNav: false,
          icon: 'el-icon-eleme'
        },
        component: () => import("@/views/tenant/info.vue"),
      },
    ],
  },
  {
    path: "/content",
    name: "content",
    meta: {
      title: "内容管理",
      isNav: true,
      icon: 'el-icon-tickets'
    },
    redirect: "/content/list",
    component: () => import("@/views/index.vue"),
    children: [
      {
        path: "/content/list",
        name: "content_list",
        meta: {
          title: "内容列表",
          isNav: true,
          icon: 'el-icon-tickets'
        },
        component: () => import("@/views/content/list.vue"),
      },
      {
        path: "/content/library",
        name: "content_library",
        meta: {
          title: "内容库",
          isNav: true,
          icon: 'el-icon-box'
        },
        component: () => import("@/views/content/library/index.vue"),
      },
      {
        path: "/content/create",
        name: "content_create",
        meta: {
          title: "新建大屏",
          isNav: false,
          icon: 'el-icon-box'
        },
        component: () => import("@/views/content/create/index.vue"),
      }
    ],
  },
];
